import 'package:car_map/mode/spuare_type_mode.dart';
import 'package:flutter/material.dart';

import 'spuare_type_item.dart';

class SpuareTypeGrived extends StatelessWidget {
  final List<SpuareTypeModel> spuare;

  const SpuareTypeGrived({Key key, this.spuare}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return Container(
        decoration: BoxDecoration(
            color: Colors.white,
            borderRadius: BorderRadius.all(Radius.circular(5.0))),
        child: GridView.builder(
          gridDelegate:
              SliverGridDelegateWithFixedCrossAxisCount(
                  crossAxisCount: 4,

              ),
          itemBuilder: (BuildContext context, int index) {
            return SpuareTypeItem(
              spuareTypeModel: spuare[index],
            );
          },
          itemCount: spuare.length,
          shrinkWrap: true,
          physics: new NeverScrollableScrollPhysics(), //增加
        )
        );
  }
}
